/*
整个项目api的管理
*/

import request from "./request"
export default {
    // home组件左侧表格数据获取
    getTableData(params) {
        return request({
            url: '/home/getTableData',
            method: 'get',
            data: params,
            mock: false
        })
    },
    getCountData(params) {
        return request({
            url: '/home/getCountData',
            method: 'get',
            data: params,
            mock: false
        })
    },
    getChartData(params) {
        return request({
            url: '/home/getChartData',
            method: 'get',
            data: params,
            mock: false
        })
    },
    getUserData(params) {
        return request({
            url: `/user/getUserList?keyword=${params.keyword}&pageIndex=${params.pageIndex}&pageSize=${params.pageSize}`,
            method: 'get',
            mock: false
        })
    },
    AddUser(params) {
        return request({
            url: '/user/AddUser',
            method: 'post',
            data: params,
            mock: false
        })
    },
    UpdateUser(params) {
        return request({
            url: '/user/UpdateUser',
            method: 'post',
            data: params,
            mock: false
        })
    },
    DeleteUser(params) {
        return request({
            url: `/user/DeleteUser?id=${params}`,
            method: 'delete',
            mock: false
        })
    },
}